package com.tarena.lbs.business.dao.repository;

import com.github.pagehelper.PageInfo;
import com.tarena.lbs.business.pojo.param.UserLocationParam;
import com.tarena.lbs.business.pojo.po.BusinessPO;
import com.tarena.lbs.business.pojo.po.StorePO;
import com.tarena.lbs.business.pojo.query.AreaStoreQuery;
import com.tarena.lbs.business.pojo.query.StoreQuery;
import com.tarena.lbs.business.pojo.vo.NearStoreVO;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface StoreRepository {

    BusinessPO getBusinessById(Integer businessId);

    void insertStore(StorePO storePO);

    PageInfo<StorePO> pagesList(StoreQuery query);

    PageInfo<StorePO> getAreaStorePageList(Integer businessId, AreaStoreQuery query);

    StorePO getStoreById(Integer storeId);

    void deleteStore(Integer storeId, Integer businessId);

    List<NearStoreVO> getNearStores(UserLocationParam param);

    Boolean geoStationsExists();

    Long countAll();

    List<StorePO> getStationsPage(int pageNum, int pageSize);

    void saveGeos(List<StorePO> pos);

    void disableStore(Integer storeId, Integer businessId);

    void enableStore(Integer storeId, Integer businessId);

    void updateStore(StorePO storePO);
}
